﻿<%@ Page Language="C#" CodeBehind="Users.aspx.cs" Inherits="Yglu.WebAdmin.Users_aspx" MasterPageFile="~/MainLayout.master" %>
<%@ Import Namespace="Yglu.WebAdmin"%>
<%@ MasterType TypeName="Yglu.WebAdmin.MainLayout_master" %>
<asp:Content ContentPlaceHolderID="MainContents" runat="server">
	<asp:Panel ID="PanEdit" CssClass="PanEditForm" runat="server">
		<fieldset class="FormField">
			<legend><asp:Literal ID="LitEditLegend" runat="server" /></legend>
			<ol>
				<li>
					<asp:Label AssociatedControlID="TxtUserId" meta:resourcekey="LblUserId" runat="server" />
					<asp:TextBox ID="TxtUserId" CssClass="FormText" Width="100px" meta:resourcekey="TxtUserId" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="CboStore" meta:resourcekey="LblStore" runat="server" />
					<asp:DropDownList ID="CboStore" CssClass="FormSelect" Width="200px" DataTextField="Title" DataValueField="Id" meta:resourcekey="CboStore" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="CboAdminLevel" meta:resourcekey="LblAdminLevel" runat="server" />
					<asp:DropDownList ID="CboAdminLevel" CssClass="FormSelect" Width="200px" meta:resourcekey="CboAdminLevel" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtUserFullName" meta:resourcekey="LblUserFullName" runat="server" />
					<asp:TextBox ID="TxtUserFullName" CssClass="FormText" Width="200px" meta:resourcekey="TxtUserFullName" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtUserFullName" Display="None" meta:resourcekey="ReqTxtUserFullName" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtUserPhone" meta:resourcekey="LblUserPhone" runat="server" />
					<asp:TextBox ID="TxtUserPhone" CssClass="FormText" Width="200px" meta:resourcekey="TxtUserPhone" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtUserPhone" Display="None" meta:resourcekey="ReqTxtUserPhone" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPassword" meta:resourcekey="LblPassword" runat="server" />
					<asp:TextBox ID="TxtPassword" CssClass="FormText" Width="200px" TextMode="Password" meta:resourcekey="TxtPassword" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtPasswordConfirm" meta:resourcekey="LblPasswordConfirm" runat="server" />
					<asp:TextBox ID="TxtPasswordConfirm" CssClass="FormText" Width="200px" TextMode="Password" meta:resourcekey="TxtPasswordConfirm" runat="server" />
					<asp:CompareValidator ControlToValidate="TxtPassword" ControlToCompare="TxtPasswordConfirm" Display="None" meta:resourcekey="ValTxtPassword" runat="server" />
				</li>				
				<li>
					<asp:Label AssociatedControlID="ChkUserActive" meta:resourcekey="LblUserActive" runat="server" />
					<asp:CheckBox ID="ChkUserActive" meta:resourcekey="ChkUserActive" runat="server" />
				</li>
			</ol>
			<div class="FormFooterBar">
				<asp:Button CssClass="FormButton" OnClick="ButSave_Click" meta:resourcekey="ButSave" runat="server" />
				<asp:Button CssClass="FormButton" OnClick="ButCancel_Click" CausesValidation="false" meta:resourcekey="ButCancel" runat="server" />
				<asp:ValidationSummary CssClass="ValSummary" DisplayMode="List" ShowSummary="true" HeaderText="<%$ Resources:Messages,ValidationSummary %>" runat="server" />
			</div>
		</fieldset>
		<asp:PlaceHolder ID="PlaceReports" runat="server">
			<fieldset class="PageReportField">
				<legend><asp:Literal meta:resourcekey="LitOrderReports" runat="server" /></legend>
				<asp:GridView ID="GridReports" runat="server">
					<Columns>
						<asp:BoundField DataField="Title" ReadOnly="true" meta:resourcekey="GridColPeriod" />
						<asp:BoundField DataField="PriceWithDiscount" ReadOnly="true" DataFormatString="{0:0.00}" meta:resourcekey="GridColTotalPrice" />
						<asp:BoundField DataField="OrderCount" ReadOnly="true" meta:resourcekey="GridColOrders" />
						<asp:BoundField DataField="ComboCount" ReadOnly="true" meta:resourcekey="GridColCombos" />
						<asp:BoundField DataField="MostSoldProductTitle" ReadOnly="true" meta:resourcekey="GridColProduct" />
					</Columns>
				</asp:GridView>
			</fieldset>
		</asp:PlaceHolder>
	</asp:Panel>
	<asp:Panel ID="PanGrid" runat="server">
		<asp:Button ID="ButAddNew" CssClass="FormButton ButtonAddNew" OnClick="ButAddNew_Click" meta:resourcekey="ButAddNew" runat="server" />
		<asp:Label ID="LblGridCount" meta:resourcekey="LblGridCount" runat="server" />
		<asp:GridView ID="GridUsers" OnRowCommand="GridUsers_RowCommand" runat="server">
			<Columns>
				<asp:BoundField DataField="Id" SortExpression="Id" ReadOnly="true" meta:resourcekey="GridColId" />
				<asp:BoundField DataField="StoreTitle" SortExpression="StoreTitle" ReadOnly="true" meta:resourcekey="GridColStoreTitle" />
				<asp:BoundField DataField="FullName" SortExpression="Title" ReadOnly="true" meta:resourcekey="GridColFullName" />
				<asp:BoundField DataField="Phone" SortExpression="Priority" ReadOnly="true" meta:resourcekey="GridColPhone" />
				<asp:BoundField DataField="AdminLevel" SortExpression="MultiSelect" ReadOnly="true" meta:resourcekey="GridColAdminLevel" />
				<asp:BoundField DataField="Active" SortExpression="Active" ReadOnly="true" meta:resourcekey="GridColActive" />
				<asp:ButtonField AccessibleHeaderText="Edit" meta:resourcekey="GridColEdit" />
			</Columns>
		</asp:GridView>
	</asp:Panel>
</asp:Content>